//
//  CoverTableViewCell.m
//  Toyohu
//
//  Created by Heige on 16/4/28.
//  Copyright © 2016年 celia. All rights reserved.
//

#import "CoverTableViewCell.h"
#import <UIImageView+WebCache.h>
#import "AboutExpertModel.h"
@implementation CoverTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)init 
{
    self = [[[NSBundle mainBundle] loadNibNamed:@"CoverTableViewCell" owner:self options:nil] objectAtIndex:0];
    if (self) {
        
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setModel:(AboutExpertModel *)model
{
    _model = model;
    [_personalImg sd_setImageWithURL:[NSURL URLWithString:model.eHeadUrl]];
    _name.text = model.eName;
    _sketch.text = model.eAppellation;
    _focusNum.text =[NSString stringWithFormat:@"%ld人关注",(long)model.eViewNum];
    if (model.subscription==1) {
        [_focusButton setTitle:@"已关注" forState:UIControlStateNormal];
    }
    else
    {
        [_focusButton setTitle:@"关注" forState:UIControlStateNormal];
    }
    
    
}

@end
